<%@ page import="java.sql.*,studentportal.*"%>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>

<body>

<table border="1" width="100%">
  <tr>
    <td width="100%">&nbsp;</td>
  </tr>
</table>
<table border="1" width="100%">
  <tr>
    <td width="23%">
      <p align="center"><a href="CollegeHome.html">About College</a></td>
    <td width="17%">
      <p align="center"><a href="AdminHome.html">Admin</a></td>
    <td width="20%">
      <p align="center">Faculty</td>
    <td width="20%">
      <p align="center"><a href="StudentLogin.html">Students</a></td>

    <td width="20%">
      <p align="center"><a href="AdmissionsHome.html">Admissions</a></td>

    <td width="20%">
      <p align="center">Corporate</td>
  </tr>
</table>

<%
					
					Connection con=MySQLDriver.getConnection(); 
					Statement st=con.createStatement();
					System.out.println("After Statement");
					String sr="select * from student_master where student_id='"+request.getParameter("sid")+"'";
					System.out.println(sr);
					ResultSet rs=st.executeQuery(sr);
					rs.next();
					//Student stu=(Student)session.getAttribute("Student");
%>
<p align="center">&nbsp;</p>
<form method="POST" action="./StudentRegServlet">
  <!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.txt"
  S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
  <div align="center">
    <center>
    <table border="1" width="68%" bordercolor="#0000FF">
      <tr>
        <td width="100%" colspan="2">
          <p align="center">Student Registration Form</td>
      </tr>
    </center>
    <tr>
      <td width="50%" valign="middle" align="left">
        <p align="left">Student ID</td>
      <center>
       <td width="50%"><input type="text" name="sid" size="20" tabindex="1" value="<%=rs.getString(1)%>"></td>	
      </tr>
    </center>
    <tr>
      <td width="50%" valign="middle" align="left">
        <p align="left">Name</td>
      <center>
      <td width="50%"><input type="text" name="sname" size="20" tabindex="2" value="<%=rs.getString(2)%>"></td>
      </tr>
      <tr>
        <td width="50%" valign="middle" align="left">Address</td>
        <td width="50%"><textarea rows="2" name="sadd" cols="20" tabindex="3"><%=rs.getString(3)%></textarea></td>
      </tr>
      <tr>
        <td width="50%" valign="middle" align="left">Date of Birth</td>
        <td width="50%"><input type="text" name="sdob" size="20" tabindex="4" value="<%=rs.getDate(4)%>"></td>
      </tr>
      <tr>
        <td width="50%" valign="middle" align="left">Phone Number</td>
        <td width="50%"><input type="text" name="sphone" size="20" tabindex="5" value="<%=rs.getString(5)%>"></td>
      </tr>
      <tr>
        <td width="50%" valign="middle" align="left">Email ID</td>
        <td width="50%"><input type="text" name="semail" size="20" tabindex="6" value="<%=rs.getString(6)%>"></td>
      </tr>
      <tr>
        <td width="50%" valign="middle" align="left">Admission Date</td>
        <td width="50%"><input type="text" name="sdoa" size="20" tabindex="7" value="<%=rs.getDate(7)%>"></td>
      </tr>
      <tr>
        <td width="50%" valign="middle" align="left">Login Name</td>
        <td width="50%"><input type="text" name="slogin" size="20" tabindex="8" value="<%=rs.getString(8)%>"></td>
      </tr>
	  <tr>
        <td width="100%" colspan="2">
          <p align="center"><input type="submit" value="Update" name="action" tabindex="9"><input type="submit" value="Reset" name="action" tabindex="10"></td>
      </tr>
    </table>
    </center>
  </div>
</form>
<p align="left">&nbsp;</p>


</body>

</html>
